﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TemplateWeb.Models.ViewModels.GroupViewModel>" %>
<table cellpadding="0" cellspacing="0" style="width: 100%">
    <tr>
        <td style="background-image: url(../../Content/Images/Admin/backgr.gif); height: 60px;
            text-align: center">
            <a href="<%= Url.Action("Index", "Home") %>" style="text-decoration: none;"><span
                style="color: #cc0000; font-size: 25px; font-weight: bold;">
                <%= WebConfiguration.SiteName %></span> </a>
        </td>
    </tr>
    <tr>
        <td style="height: 1px; background-color: #484883">
        </td>
    </tr>
    <tr>
        <td style="vertical-align: top; padding: 0px;">
            <div style="margin: 5px;">
                <script type="text/javascript">
					d = new dTree('d');
					d.add(0, -1, ' Administration&nbsp;(<a href="javascript: d.openAll();"><u>expand all</u></a>&nbsp;<a href="javascript: d.closeAll();"><u>collapse all</u></a>)');
					d.add(1, 0, 'Thông tin công ty', '../Admin/SelectThongTinCongTy');
					d.add(2, 0, 'Đối tác', '../Admin/SelectDoiTac');

					d.add(3, 0, 'Loại sách', '../Admin/SelectLoaiSach');
			        <% 
                       var lstLoaiSach = Model.LoaiSachModel.GetModel.LstObjModel;
                       for (int i = 0; i < lstLoaiSach.Count; i++){ %>
                        d.add(3<%= i %>, 3, '<%= lstLoaiSach[i].TenLoaiSach %>', '../../Admin/SelectSachByIDLoaiSach?idloaisach=<%= lstLoaiSach[i].ID %>'); 
                    <% } %>

                    d.add(4, 0, 'Loại tin tức', '../Admin/SelectLoaiTinTuc');
                    <% 
                       var lstLoaiTinTuc = Model.LoaiTinTucModel.GetModel.LstObjModel;
                       for (int i = 0; i < lstLoaiTinTuc.Count; i++){ %>
                        d.add(4<%= i %>, 4, '<%= lstLoaiTinTuc[i].TenLoaiTinTuc %>', '../../Admin/SelectTinTucByIDLoaiTinTuc?idloaitintuc=<%= lstLoaiTinTuc[i].ID %>'); 
                    <% } %>

                    d.add(5, 0, 'Góc chia sẻ', '../Admin/SelectGocChiaSe');
                    d.add(6, 0, 'DoanhThu', '../Admin/Revenue');
                    d.add(62, 0, 'Quản lý đơn hàng', '../Admin/SelectOrders');
                    d.add(61, 0, 'Tìm kiếm đơn hàng', '../Admin/TimKiemDonHang');
                    d.add(7, 0, 'Hộp thư', '../Admin/SelectHopThu');
                <% if("SUPERADMIN".Equals(Roles.GetRolesForUser(Page.User.Identity.Name)[0].ToUpper()))
                   { %>
                    d.add(12, 0, 'Người dùng', '../Admin/SelectNguoiDung?role=<%= Roles.GetRolesForUser(Page.User.Identity.Name)[0] %>');
                <% } %>

					d.config.useLines = true;
					document.write(d);
                </script>
            </div>
        </td>
        <td style="background-image: url(../../Content/Images/Admin/backgr.gif); height: 23px;">
        </td>
    </tr>
</table>
